import simplejson
import urllib

API_URL = "http://api.douban.com"

def getDoubanPeople(uid):
    peopleurl = API_URL+"/people/"+str(uid)+"?alt=json"
    thestr = urllib.urlopen(peopleurl).read()
    return simplejson.loads(thestr)

if __name__ == "__main__":
    print getDoubanPeople("3473702")["db:uid"]
